Don't try to toggle the visibility of the location entry field in search
authorJan Arne Petersen <jpetersen@jpetersen.org>
Sat, 24 May 2008 18:59:56 +0000 (18:59 +0000)
committerJan Arne Petersen <jap@src.gnome.org>
Sat, 24 May 2008 18:59:56 +0000 (18:59 +0000)
2008-05-24  Jan Arne Petersen  <jpetersen@jpetersen.org>

* gtk/gtkfilechooserdefault.c: (location_toggle_popup_handler): Don't
try to toggle the visibility of the location entry field in search and
recent mode (#526422)

svn path=/trunk/; revision=20138

ChangeLog
gtk/gtkfilechooserdefault.c

index 11e77b7ce0bcbcc9ddcdb382a4a23fb5cdb1e089..59ee0a90aab19638eb0ef7155503dcbcc724cffd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-24  Jan Arne Petersen  <jpetersen@jpetersen.org>
+
+       * gtk/gtkfilechooserdefault.c: (location_toggle_popup_handler): Don't
+       try to toggle the visibility of the location entry field in search and
+       recent mode (#526422)
+
 2008-05-24  Jan Arne Petersen  <jpetersen@jpetersen.org>
 
        * gtk/gtkfilechooserdefault.c: (shortcuts_query_tooltip_cb),
index fbd0295bd3bd77e9b606876c7cd2cc2dc90e539c..ecb01d53ef006cf24ca8944db068d2d3269dde27 100644 (file)
@@ -5216,6 +5216,14 @@ location_mode_set (GtkFileChooserDefault *impl,
 static void
 location_toggle_popup_handler (GtkFileChooserDefault *impl)
 {
+  /* when in search or recent files mode, we are not showing the
+   * location_entry_box container, so there's no point in switching
+   * to it.
+   */
+  if (impl->operation_mode == OPERATION_MODE_SEARCH ||
+      impl->operation_mode == OPERATION_MODE_RECENT)
+    return;
+
   /* If the file entry is not visible, show it.
    * If it is visible, turn it off only if it is focused.  Otherwise, switch to the entry.
    */